<?PHP 
$related_links_show=new related_links();
$related_links_show->related_link_content_id=$values[0]['content_id'];
$related_links_show->related_links_table_display();

printdisplayheader('Related Links','Related Links for This Content');
$url=htmlspecialchars($_SERVER['PHP_SELF'])."?a=".$_GET['a']."&content_id=".$_GET['content_id']."&related_link_delete_id=";
printdatatablev2("DATA",$related_links_show->content_data, NULL, NULL,$url, 1,0, NULL);
?>







	<?PHP


		if($_POST['cmd']=='related_link_add')
		{

			$related_links_action=new related_links();
			$related_links_action->content_db=$_POST;
			$msg=$related_links_action->related_links_add();
		//	printmessage($msg);
			echo $msg;
		}

		if(!empty($_GET['related_link_delete_id']))
		{

			$related_links_delete=new related_links();
			$related_links_delete->related_link_id=$_GET['related_link_delete_id'];
			$msg=$related_links_delete->related_links_delete();
		//	printmessage($msg);

		}

	?>
	<br />
	<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>?a=<?PHP echo $_GET['a'];?>&content_id=<?PHP echo $_GET['content_id'];?>" method="POST" accept-charset="utf-8" enctype="multipart/form-data">


		<?PHP
		printinputt("related_link_url","related_link_url","Add Related Link URL",50,99,"http://",NULL);
		printinputt("related_link_name","related_link_name","Name",50,99,NULL,NULL);
		printsubmit("Add");
		?>


		<input type="hidden" name="content_id" value="<?PHP echo $values[0]['content_id'];?>" >
		<input type="hidden" name="cmd" value="related_link_add" >
	</form>






<?PHP
printdisplayfooter(NULL,NULL,NULL,NULL,NULL,NULL); 

?>